<%@ page contentType="text/html;charset=UTF-8" %>
<%@include file="../../common/sessionValidate.jsp" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<!DOCTYPE HTML>
<html lang="UTF-8">
<head>
    <title>T_demo信息维护</title>
    <%@ include file="../../common/meta.jsp" %>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta http-equiv="X-UA-Compatible" content="IE=9">
    <META HTTP-EQUIV="Cache-Control" CONTENT="no-cache, must-revalidate">
    <link rel="stylesheet" href="<%=basePath%>css/my-bootstrap.css" media="screen" id="tuserskin">
    <link rel="stylesheet" href="<%=basePath%>js/toastr/toastr.css">
    <link rel="stylesheet" href="<%=basePath%>css/bootstrapValidator.min.css">
    <link rel="stylesheet" href="<%=basePath%>css/font-awesome.min.css">
    <script type="text/javascript" src="<%= basePath %>js/jquery.cookie.js"></script>
</head>
<style>
    hr {
        margin-top: 1px;
        border-bottom: 1px solid #1BBC9B;
    }
</style>
<body>
<div>
    <!-------------------------- 面板  start--------------------------------->
    <form class="form-horizontal form-bordered form-row-strippe" name="ffAdd" id="ffAdd" mentod="post" role="form"
          data-toggle="validator" enctype="multipart/form-data">
        <div class="" style="margin-right:2px;padding-right:1px;">
            <div class="panel panel-primary">
                <div class="panel-heading clearfix" id="addHeaderDiv">
                </div>
                <div class="panel-body">
                    <div class="row">
                        <h5>&nbsp;&nbsp;基本信息</h5>
                        <hr>
                        <div class="col-xs-6"><!--start 换列-->
                            <div class="col-xs-12">
                                <div class="form-group">
                                    <label class="control-label col-xs-3"> idt_demo</label>
                                    <div class="col-xs-9">
                                        <input id="idt_demo" name="idt_demo" type="text" class="form-control"
                                               placeholder="idt_demo"/>
                                    </div>
                                </div>
                            </div>
                            <div class="col-xs-12">
                                <div class="form-group">
                                    <label class="control-label col-xs-3"> name</label>
                                    <div class="col-xs-9">
                                        <input id="name" name="name" type="text" class="form-control"
                                               placeholder="name"/>
                                    </div>
                                </div>
                            </div>
                            <div class="col-xs-12">
                                <div class="form-group">
                                    <label class="control-label col-xs-3"> status</label>
                                    <div class="col-xs-9">
                                        <input id="status" name="status" type="text" class="form-control"
                                               placeholder="status"/>
                                    </div>
                                </div>
                            </div>
                            <div class="col-xs-12">
                                <div class="form-group">
                                    <label class="control-label col-xs-3"> biztype</label>
                                    <div class="col-xs-9">
                                        <input id="biztype" name="biztype" value="DemoApply" type="text" class="form-control"
                                               placeholder=""/>
                                    </div>
                                </div>
                            </div>
                            <div class="col-xs-12">
                                <div class="form-group">
                                    <label class="control-label col-xs-3"> ext1</label>
                                    <div class="col-xs-9">
                                        <input id="ext1" name="ext1" type="text" class="form-control"
                                               placeholder="ext1"/>
                                    </div>
                                </div>
                            </div>
                            <div class="col-xs-12">
                                <div class="form-group">
                                    <label class="control-label col-xs-3"> ext2</label>
                                    <div class="col-xs-9">
                                        <input id="ext2" name="ext2" type="text" class="form-control"
                                               placeholder="ext2"/>
                                    </div>
                                </div>
                            </div>
                            <div class="col-xs-12">
                                <div class="form-group">
                                    <label class="control-label col-xs-3"> ext3</label>
                                    <div class="col-xs-9">
                                        <input id="ext3" name="ext3" type="text" class="form-control"
                                               placeholder="ext3"/>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="col-xs-6">
                            <!--如果输入元素是奇数个元素，在n=size/2?int时输出2列格式；如果元素是奇数个，需要在n=size/2?int+1时输出2列格式；需要换列，每行最多显示2列-->
                            <div class="col-xs-12">
                                <div class="form-group">
                                    <label class="control-label col-xs-3"> tel</label>
                                    <div class="col-xs-9">
                                        <input id="tel" name="tel" type="text" class="form-control" placeholder="tel"/>
                                    </div>
                                </div>
                            </div>
                            <div class="col-xs-12">
                                <div class="form-group">
                                    <label class="control-label col-xs-3"> address</label>
                                    <div class="col-xs-9">
                                        <input id="address" name="address" type="text" class="form-control"
                                               placeholder="address"/>
                                    </div>
                                </div>
                            </div>
                            <div class="col-xs-12">
                                <div class="form-group">
                                    <label class="control-label col-xs-3"> creater</label>
                                    <div class="col-xs-9">
                                        <input id="creater" name="creater" type="text" class="form-control"
                                               placeholder="creater"/>
                                    </div>
                                </div>
                            </div>
                            <div class="col-xs-12">
                                <div class="form-group">
                                    <label class="control-label col-xs-3"> creattime</label>
                                    <div class="col-xs-9">
                                        <input id="creattime" name="creattime" type="text" class="form-control"
                                               placeholder="creattime"/>
                                    </div>
                                </div>
                            </div>
                            <div class="col-xs-12">
                                <div class="form-group">
                                    <label class="control-label col-xs-3"> updater</label>
                                    <div class="col-xs-9">
                                        <input id="updater" name="updater" type="text" class="form-control"
                                               placeholder="updater"/>
                                    </div>
                                </div>
                            </div>
                            <div class="col-xs-12">
                                <div class="form-group">
                                    <label class="control-label col-xs-3"> updatertime</label>
                                    <div class="col-xs-9">
                                        <input id="updatertime" name="updatertime" type="text" class="form-control"
                                               placeholder="updatertime"/>
                                    </div>
                                </div>
                            </div>
                        </div><!--end 换列-->
                    </div><!--end row-->
                </div><!--end body-->

            </div>
        </div>
    </form>
    <!--------------------------面板 end------------------------------------>

    <!-------------------------- 审核面板  start--------------------------------->
    <%@ include file="../../index/shenheDiv.jsp" %>
    <!-------------------------- 审核面板  end--------------------------------->

</div>
</body>
</html>

<script src="<%=basePath%>js/bootstrap.min.js"></script>
<!--<script src="<%=basePath%>js/jquery-1.10.2/jquery.min.js"></script>
<script type="text/javascript" src="js/bootstrapValidator.js"></script>-->
<script src="<%=basePath%>js/bootstrap-paginator.min.js"></script>
<script src="<%=basePath%>/js/respond.js"></script>
<script src="<%=basePath%>/js/html5.js"></script>
<script src="<%=basePath%>js/toastr/toastr.js"></script>
<script src="<%=basePath%>js/bootbox.js"></script>
<script src="<%=basePath%>js/jquery.validate.js"></script>
<!-- <script src="<%=basePath%>js/additional-methods.min.js"></script> -->
<script src="<%=basePath%>js/my-jquery-curd.js"></script>
<script src="<%= basePath %>js/tableSortTool.js"></script>
<script src="<%= basePath %>js/calendar.js"></script>
<script type="text/javascript">
    //审核通过提交表单；
    function shtg() {
        var url = "<%=basePath%>t_demo/shtgT_demo?time=" + Math.random();
        confirmMyCurdShtg(url);
    }

    //审核退回提交表单；
    function shth() {
        var url = "<%=basePath%>t_demo/shthT_demo?time=" + Math.random();
        confirmMyCurdShth(url);
    }

    //初始化页面加载表单值；
    $().ready(function () {
        //1、初始化数据显示
        var name = "T_demo信息";
        var id = '<%=request.getParameter("appid")%>';
        var tninstanceid = '<%=request.getParameter("tninstanceid")%>';
        var oplx = '<%=request.getParameter("oplx")%>';
        //设置审核意见表单默认值；
        $("#tninstanceid").val(tninstanceid);
        $("#appid").val(id);
        var basePath = "<i class='icon-eye-open'></i>&nbsp;";//设置addHeaderDiv标题文字及按钮
        setHeader2("审核" + name, basePath);
        var url = "<%=basePath%>t_demo/getT_demo?id=" + id + "&time=" + Math.random();
        $.getJSON(url, function (data) {//获取数据，并且自动填充form，自动代码待修改； @todo;
            setValue(data);
        });
        formReadOnly2('ffAdd');//设置表单不可修改; 会影响所有表单输入框；

        //如果是审核进来的；还是查看历史任务进来的；现实不同按钮
        if (oplx == 'check') {
            $("#checkButtonDiv").show();
            $("#hisButtonDiv").hide();
            $("#note").removeAttr("readOnly");
        } else if (oplx == 'his') {
            $("#checkButtonDiv").hide();
            $("#hisButtonDiv").show();
            $("#note").attr("readOnly", "true");
        }
    }) //end funciton read;

</script>